﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Data;
namespace QuanLyKhachSan_DAL_WS
{
    /// <summary>
    /// Summary description for QLKS_DAL_WS
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
    // [System.Web.Script.Services.ScriptService]
    public class QLKS_DAL_WS : System.Web.Services.WebService
    {
        

        #region đăng nhập
        [WebMethod]
        public CTAIKHOAN dangNhap(string username, string password)
        {
            CTAIKHOAN tk = null;
            tk = XuLyTaiKhoan.dangNhap(username, password);
            return tk;
        }
        #endregion        
        #region Thêm khách hàng
        [WebMethod]
        public Boolean ThemKhachHang(CKHACHHANG kh)
        {
            Boolean kq = XuLyKhachHang.ThemKhachHang(kh);
            return kq;
        }
        #endregion        
        #region Tìm KH theo CMND
        public CKHACHHANG TimKhachHangTheoSoCMND(string cmnd)
        {
            CKHACHHANG kh = new CKHACHHANG();
            kh = XuLyKhachHang.TimKhachHangTheoSoCMND(cmnd);
            return kh;
        }        
        #endregion
        #region Thêm phiếu thuê
        public Boolean ThemPhieuThue(CPHIEUTHUE pt)
        {
            Boolean kq = XuLyPhieuThue.ThemPhieuThue(pt);
            return kq;
        }
        #endregion             
        #region Sửa tình trạng phòng
        public Boolean SuaTinhTrangPhong(int tinhTrang, string maPhong)
        {
            Boolean kq = XuLyPhong.SuaTinhTrangPhong(tinhTrang, maPhong);
            return kq;
        }
        #endregion        
        #region tìm DS Khách hàng
        public DataTable TimDSKhachHang()
        {
            DataTable dt = new DataTable();
            dt = XuLyKhachHang.TimDSKhachHang();
            return dt;
        }
        #endregion   
        #region tìm phiếu thuê theo mã KH
        public CPHIEUTHUE TimMotPhieuThueTheoMaKH(int maKH)
        {
            CPHIEUTHUE pt = XuLyPhieuThue.TimMotPhieuThueTheoMaKH(maKH);
            return pt;
        }
        #endregion
        #region tìm kiếm KH
        public DataTable TimDSPhongTrong()
        {
            DataTable dt=new DataTable();
            dt=XuLyPhong.TimDSPhongTrong();
            return dt;
        }
        #endregion                
        #region danh sách loại phòng
        public DataTable DanhSachLoaiPhong()
        {
            DataTable dt = new DataTable();
            dt = XuLyLoaiPhong.DanhSachLoaiPhong();
            return dt;
        }
        #endregion           
        #region danh sách phiếu thuê
        public DataTable danhSachPhieuThue()
        {
            DataTable dt = new DataTable();
            dt = XuLyPhieuThue.danhSachPhieuThue();
            return dt;
        }
        #endregion                
        #region danh sách phòng
        public DataTable DanhSachPhong()
        {
            DataTable dt = new DataTable();
            dt = XuLyPhong.DanhSachPhong();
            return dt;
        }
        #endregion        
        #region lấy danh sách nhân viên
        public DataTable TimToanBoNhanVien(string maLoaiNV)
        {
            DataTable dt = new DataTable();
            dt = XuLyNhanVien.TimToanBoNhanVien(maLoaiNV);
            return dt;
        }
        #endregion
        #region tìm nhân viên theo mã NV
        public CNHANVIEN TimNhanVienTheoMaNV(int maNhanVien)
        {
            CNHANVIEN nv = new CNHANVIEN();
            nv = XuLyNhanVien.TimNhanVienTheoMaNV(maNhanVien);
            return nv;
        }
        //public DataTable danhSachPhieuThue()
        //{
        //    DataTable dt = new DataTable();
        //    dt = XuLyPhieuThue.danhSachPhieuThue();
        //    return dt;
        //}
        #endregion
        
        #region xyz
        #endregion
    }
}
